#include <stdio.h>
#include <stdlib.h>

typedef struct ListNode {
    int data;
    struct ListNode *next;
} ListNode;
ListNode *ha;
//ha->next = 一个链表第一个元素
int n;
void main(){
    ListNode *current = ha->next;
    ListNode *right= current->next;
    ListNode *tail=NULL;
    for (int i=1; i<=(n-1)/2;i++){
        tail=ha->next;
        for (int j=0; j<n-1; j++){tail=tail->next;}
        current->next=tail;
        tail->next=right;
        current=right;
        right=right->next;}
    tail=NULL;
    current=NULL;
    right=NULL;
}